package project.pianpian.mapper;

import project.pianpian.entity.Demand;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Description:
 * Param:
 * return:
 * Author: HSY
 * Date:2022/12/26
 */
@Mapper
public interface DemandMapper {

    List<Demand> getDemands();
    Demand getDemandById(int id);
    int  addDemand(Demand demand);
    int updateDemandStatus(int id);
    @Select("select * from demand where isContracted = 0 limit #{pageNum},#{pageSize}")
    List<Demand> selectPage(Integer pageNum, Integer pageSize);

}
